home *** CD-ROM | disk | FTP | other *** search
/ ETO Development Tools 4 / ETO Development Tools 4.iso / Tools - Objects / E.T.O. #4 Installer / Install < prev    next >
Text File  |  1991-05-23  |  18KB  |  711 lines

  1. #    C D   I N S T A L L A T I O N   S C R I P T
  2. #
  3. #    Copyright Apple Computer, Inc. 1987, 1988, 1989, 1990, 1991
  4. #    All rights reserved.
  5. #
  6. #                            -------WARNING------
  7. #    This program was written on computers composed of 100% matter. Any contact
  8. #    with antimatter in any form will result in a Catastrophic Explosion™.
  9. #
  10. #    This script is used to install MPW, MacApp, C++, SADE, MacsBug, Omega SANE,
  11. #    ResEdit and MPW 411 from the “E.T.O. #4” distribution compact disk 
  12. #    onto a destination hard disk. This script can also update from previous 
  13. #    versions of these products to the latest releases and revert from
  14. #    later versions to a previous release.
  15. #
  16. #
  17. #    This script accepts the following options (set by the Commando interface):
  18. #
  19. #    -to            sets the "to" directory
  20. #
  21. #    -install    flag to install a new complete version of MPW
  22. #    -update        flag to update an existing version of MPW (default behaviour)
  23. #    -revert        flag to revert to a previous version of MPW
  24. #
  25. #    -progress    flag to show progress
  26. #
  27. #    -SADE1.0    flag to install SADE environment (version 1.0)
  28. #    -SADE1.1    flag to install SADE environment (version 1.1)
  29. #    -SADE1.2    flag to install SADE environment (version 1.2)
  30. #    -SADE1.3    flag to install SADE environment (version 1.3)
  31. #
  32. #    -MB6.1        flag to install Macsbug (version 6.1 - in System Folder)
  33. #    -MB6.2        flag to install Macsbug (version 6.2 - in System Folder)
  34. #
  35. #    -ResEdit1.2    flag to install ResEdit (version 1.2)
  36. #    -ResEdit2.1    flag to install ResEdit (version 2.1)
  37. #    -ReseditEXP    flag to install ResEdit (version 2.1.1b1)
  38. #
  39. #    -MPW3.0        flag to install MPW (version 3.0)
  40. #    -MPW3.1        flag to install MPW (version 3.1)
  41. #    -MPW3.2        flag to install MPW (version 3.2)
  42. #    -MPWQR        flag to install MPW (version 3.2 QR4)
  43. #    -MPWEXP        flag to install MPW (version 3.3 EXP AKA PQR4)
  44. #
  45. #    -MacApp2    flag to install MacApp (version 2.0.1)
  46. #    -MacApp3    flag to install MacApp (version 3.0a2)
  47. #
  48. #    -C++        flag to install C++ (version 3.1)
  49. #    -C++EXP        flag to install C++ (version 3.2d4 AKA PQR4)
  50. #
  51. #    -411Tools    flag to install 411 in MPW folder (Tools only)
  52. #    -411All        flag to install 411 in MPW folder (Complete environment)
  53. #
  54. #    -SANE        flag to install Omega SANE Init (version 1.0b4)
  55. #
  56. #    -BB            flag to install Big Brother
  57. #
  58. #    -SB            flag to install SourceBug
  59. #
  60.  
  61. ##################
  62. ###    DEBUG CODE ###
  63. ##################
  64.  
  65. Set    DebugFlag    0        # Set to 1 for debugging, set to 0 for normal operation
  66.  
  67. ##################
  68.             
  69. Set quit 0                # Clear our user-defined quit flag.  If it
  70. Export quit                # is ever Set non-zero, the user hit cancel
  71.                         # somewhere and the script should quit.
  72. Set Exit 0
  73. Export Exit
  74.  
  75. ###                        Set some defaults
  76.             
  77. Set CDVolume    "E.T.O. #4:"        ### the volume name of the distribution CD
  78. Export CDVolume
  79.  
  80. Set    Tools        "Tools - Objects:"    ### where the tools are located!
  81. Export Tools
  82.             
  83.  
  84. ###        Check to see if we can find the CD…
  85.  
  86. If Not "`Exists -d "{CDVolume}"`"
  87.         Alert "Volume {CDVolume} is not online!"
  88.         Exit 1
  89. End
  90.  
  91.  
  92. #    {DestVolume} - the volume name of the destination hard drive
  93.  
  94. ###                        Get the current volume name
  95.  
  96.  
  97. Set DestVolume `which "{0}"`                    # get pathname of this script
  98. Set DestVolume "`files -q -f "{DestVolume}"`"    # convert to full pathname
  99. If "{DestVolume}"=~/(≈:)®1≈/                    # strip the filename
  100.     Set DestVolume "{®1}"
  101. End
  102. Loop
  103.     If "{DestVolume}"=~/(≈:)®1≈:/                # strip all sub-directories
  104.         Set DestVolume "{®1}"
  105.     Else
  106.         Break
  107.     End
  108. End
  109.  
  110. export    DestVolume
  111.  
  112.  
  113. ###        Get the System Version (used for the SADE Installation)
  114.  
  115. Set    SysVersion    "`versionlist -h -u "{SystemFolder}" -creator MACS System`"
  116.  
  117.     If "{SysVersion}" =~ /≈ 6.0.1≈/
  118.         Set SysVersion    61
  119.     Else If "{SysVersion}" =~ /≈ 6.0.2≈/
  120.         Set SysVersion    62
  121.     Else If "{SysVersion}" =~ /≈ 6.0.3≈/
  122.         Set SysVersion    63
  123.     Else If "{SysVersion}" =~ /≈ 6.0.4≈/
  124.         Set SysVersion    64
  125.     Else If "{SysVersion}" =~ /≈ 6.0.5≈/
  126.         Set SysVersion    65
  127.     Else If "{SysVersion}" =~ /≈ 6.0≈/
  128.         Set SysVersion    60
  129.     Else If "{SysVersion}" =~ /≈ 7.0b1≈/
  130.         Set SysVersion    71
  131.     Else If "{SysVersion}" =~ /≈ 7.0b2≈/
  132.         Set SysVersion    72
  133.     Else If "{SysVersion}" =~ /≈ 7.0b3≈/
  134.         Set SysVersion    73
  135.     Else If "{SysVersion}" =~ /≈ 7.0b4≈/
  136.         Set SysVersion    74
  137.     Else If "{SysVersion}" =~ /≈ 7.0b5≈/
  138.         Set SysVersion    75
  139.     Else If "{SysVersion}" =~ /≈ 7.0≈/
  140.         Set SysVersion    70
  141.     Else
  142.         Set    SysVersion    50
  143.     End
  144.  
  145. export    SysVersion
  146.  
  147. ###        Get the machine type and FPU type (used for the Omega SANE Installation)
  148.  
  149. Set    MachType    "`Gestalt "mach"`"
  150.  
  151. export    MachType
  152.  
  153. Set    FPUType    "`Gestalt "fpu "`"
  154.  
  155. export    FPUType
  156.  
  157.  
  158. ###        Export some variables used by the Installer
  159.  
  160. set    ToDir        "{DestVolume}MPW Folder"    # Destination ("to") directory
  161. export ToDir
  162.  
  163. set    FromDirs    ""                            # Source ("from") directory list
  164. export FromDirs
  165.  
  166. set    ToSade        "{DestVolume}SADE Folder"    # SADE destination directory
  167. export ToSade
  168.  
  169. set    FromMacApp    ""                            # MacApp source directory
  170. export FromMacApp
  171.  
  172. set ToMacApp    "{DestVolume}MacApp Folder"    # MacApp destination directory
  173. export ToMacApp
  174.  
  175.  
  176. set InstallFlag    1        # Controls Update/Install/Revert (Update is the default)
  177. set UpdateFlag    "Update"
  178.  
  179. set    RevertFlag    ""        # Controls revert function
  180. set    ProgressOption    ""    # Controls progress display
  181.  
  182. set    MacAppFlag        0    # set for MacApp Installation (to install 411 files)
  183. export    MacAppFlag
  184.  
  185. set    SADEOption        0    # Controls SADE Installation
  186. export    SADEOption
  187.  
  188. set MacsbugOption    0    # Controls Macsbug Installation
  189. export    MacsbugOption
  190.  
  191. set    411Option        0    # Controls 411 Installation
  192. export    411Option
  193.  
  194. set    ResEditOption    0    # Controls ResEdit Installation
  195. export    ResEditOption
  196.  
  197. set    SANEOption        0    # Controls Omega SANE Installation
  198. export    SANEOption
  199.  
  200. set    BBOption        0    # Controls Big Brother Installation
  201. export    BBOption
  202.  
  203. set    DisciplineOption    0    # Controls Discipline Installation
  204. export    DisciplineOption
  205.  
  206. set    ProffOption        0    # Controls Proff Tools Installation
  207. export    ProffOption
  208.  
  209. ###        Source Directories
  210.  
  211. set MPWSource    "{CDVolume}{Tools}Macintosh Programmer’s Workshop:"
  212. export MPWSource
  213.  
  214. set MacAppSource    "{CDVolume}{Tools}MacApp:"
  215. export MacAppSource
  216.  
  217. set CPlusSource    "{CDVolume}{Tools}MPW C∂+∂+:"
  218. export CPlusSource
  219.  
  220.  
  221. ###     Let's get started...
  222.  
  223. If "{#}" == "0"        ### Command Line is Empty
  224.     Exit 1
  225. End
  226.  
  227. ###     See if the source volume exists...
  228.  
  229. If Not "`Exists -d "{CDVolume}"`"
  230.         Alert "Volume {CDVolume} is not online!"
  231.         Exit 1
  232. End
  233.  
  234. ###        Collect the script parameters.
  235. Loop
  236.     Break if {#} == 0
  237.     If "{1}" =~ /-to/
  238.         Set toDir    "'{2}'"
  239.         shift 2
  240.         continue
  241.     Else If "{1}" =~ /-update/
  242.         set InstallFlag    1
  243.         set    UpdateFlag    "Update"
  244.         set    RevertFlag    ""
  245.         shift 1
  246.         continue
  247.     Else If "{1}" =~ /-install/
  248.         set InstallFlag    2
  249.         set    UpdateFlag    "Install"
  250.         set    RevertFlag    ""
  251.         shift 1
  252.         continue
  253.     Else If "{1}" =~ /-revert/
  254.         set InstallFlag    3
  255.         set    UpdateFlag    "Revert"
  256.         set    RevertFlag    "-revert"
  257.         shift 1 
  258.         continue
  259.     Else If "{1}" =~ /-MPW3.0/
  260.         Set FromDirs "{FromDirs}'{MPWSource}MPW 3.0:MPW:' "
  261.         If Not "`Exists -d "{ToDir}"`"
  262.             NewFolder "{ToDir}"
  263.         End
  264.         shift 1
  265.         continue
  266.     Else If "{1}" =~ /-MPW3.1/
  267.         Set FromDirs "{FromDirs}'{MPWSource}MPW 3.1:MPW:' "
  268.         If Not "`Exists -d "{ToDir}"`"
  269.             NewFolder "{ToDir}"
  270.         End
  271.         shift 1
  272.         continue
  273.     Else If "{1}" =~ /-MPW3.2/
  274.         Set FromDirs "{FromDirs}'{MPWSource}MPW 3.2:MPW:' "
  275.         If Not "`Exists -d "{ToDir}"`"
  276.             NewFolder "{ToDir}"
  277.         End
  278.         shift 1
  279.         continue
  280.     Else If "{1}" =~ /-MPWQR/                                
  281.         Set FromDirs "{FromDirs}'{MPWSource}MPW 3.2:MPW:' "            ###  first install MPW 3.2
  282.         Set FromDirs "{FromDirs}'{MPWSource}MPW QR4:MPW:' "            ###  then install the QR4 version
  283.         If Not "`Exists -d "{ToDir}"`"
  284.             NewFolder "{ToDir}"
  285.         End
  286.         shift 1
  287.         continue
  288.     Else If "{1}" =~ /-MPWEXP/                                
  289.         Set FromDirs "{FromDirs}'{MPWSource}MPW 3.2:MPW:' "            ###  first install MPW 3.2
  290.         Set FromDirs "{FromDirs}'{MPWSource}MPW QR4:MPW:' "            ###  then install the QR4 version
  291.         Set FromDirs "{FromDirs}'{MPWSource}MPW PQR4:MPW PQR4:' "    ###     lastly install the newer stuff...
  292.         If Not "`Exists -d "{ToDir}"`"
  293.             NewFolder "{ToDir}"
  294.         End
  295.         shift 1
  296.         continue
  297.     Else If "{1}" =~ /-MacApp2/
  298.         set FromMacApp    "MacApp 2.0.1:MacApp CD Release:MacApp 2.0.1 (Hard Disk Ready):" 
  299.         If "`Exists -d "{MacAppSource}{FromMacApp}"`"
  300.             Set MacAppFlag    1
  301.         else
  302.             set    FromMacApp    ""
  303.         End
  304.         shift 1
  305.         continue
  306.     Else If "{1}" =~ /-MacApp3/
  307.         set FromMacApp    "MacApp 3.0a2:" 
  308.         If "`Exists -d "{MacAppSource}{FromMacApp}"`"
  309.             Set MacAppFlag    2
  310.         else
  311.             set    FromMacApp    ""
  312.         End
  313.         shift 1
  314.         continue
  315.     Else If "{1}" =~ /-CPlus/
  316.         If "`Exists -d "{CPlusSource}MPW C++ 3.1:"`"
  317.             Set FromDirs "{FromDirs}'{CPlusSource}MPW C∂+∂+ 3.1:' "
  318.             If Not "`Exists -d "{ToDir}"`"
  319.                 NewFolder "{ToDir}"
  320.             End
  321.         End
  322.         shift 1
  323.         continue
  324.     Else If "{1}" =~ /-CPlusEXP/
  325.         If "`Exists -d "{CPlusSource}MPW C++ 3.1:"`"
  326.             Set FromDirs "{FromDirs}'{CPlusSource}MPW C∂+∂+ 3.1:' "            ### first install the regular version
  327.  
  328.             If "`Exists -d "{CPlusSource}MPW C++ PQR4:"`"
  329.                 Set FromDirs "{FromDirs}'{CPlusSource}MPW C∂+∂+ PQR4:' "    ###    then install the newer stuff...
  330.             End
  331.             
  332.             If Not "`Exists -d "{ToDir}"`"
  333.                 NewFolder "{ToDir}"
  334.             End
  335.         End
  336.         shift 1
  337.         continue
  338.     Else If "{1}" =~ /-SADE1.0/
  339.         set    SADEOption    1
  340.         shift 1
  341.         continue
  342.     Else If "{1}" =~ /-SADE1.1/
  343.         set    SADEOption    2
  344.         shift 1
  345.         continue
  346.     Else If "{1}" =~ /-SADE1.2/
  347.         set    SADEOption    3
  348.         shift 1
  349.         continue
  350.     Else If "{1}" =~ /-SADE1.3/
  351.         If {SysVersion} > 70 && {SysVersion} <= 74
  352.             Confirm "SADE 1.3 will only work with System Software version 7.0b4 or higher. Do you still wish to install SADE 1.3?"
  353.             Set SaveStatus {Status}
  354.             If {SaveStatus} == 0
  355.                 set    SADEOption    4
  356.             End
  357.         Else
  358.             set    SADEOption    4
  359.         End
  360.         shift 1
  361.         continue
  362.     Else If "{1}" =~ /-MB6.1/
  363.         set    MacsbugOption    1
  364.         shift 1
  365.         continue
  366.     Else If "{1}" =~ /-MB6.2/
  367.         set    MacsbugOption    2
  368.         shift 1
  369.         continue
  370.     Else If "{1}" =~ /-411Tools/
  371.         set    411Option    1
  372.         shift 1
  373.         continue
  374.     Else If "{1}" =~ /-411All/
  375.         set    411Option    2
  376.         shift 1
  377.         continue
  378.     Else If "{1}" =~ /-ResEdit1.2/
  379.         set    ResEditOption    1
  380.         shift 1
  381.         continue
  382.     Else If "{1}" =~ /-ResEdit2.1/
  383.         set    ResEditOption    2
  384.         shift 1
  385.         continue
  386.     Else If "{1}" =~ /-ResEditEXP/
  387.         set    ResEditOption    3
  388.         shift 1
  389.         continue
  390.     Else If "{1}" =~ /-SANE/
  391.         set    SANEOption    1
  392.         shift 1
  393.         continue
  394.     Else If "{1}" =~ /-BB/        ### Big Brother
  395.         set    BBOption    1
  396.         shift 1
  397.         continue        
  398.     Else If "{1}" =~ /-SB/        ### SourceBug
  399.         set    SBOption    1
  400.         shift 1
  401.         continue        
  402.     Else If "{1}" =~ /-StrictD/        ### Strict Discipline 2.0
  403.         set    DisciplineOption    1
  404.         shift 1
  405.         continue        
  406.     Else If "{1}" =~ /-LenientD/    ### Lenient Discipline 2.0
  407.         set    DisciplineOption    2
  408.         shift 1
  409.         continue        
  410.     Else If "{1}" =~ /-Strict2D/    ### Strict Discipline 2.0.1
  411.         set    DisciplineOption    3
  412.         shift 1
  413.         continue        
  414.     Else If "{1}" =~ /-Lenient2D/    ### Lenient Discipline 2.0.1
  415.         set    DisciplineOption    4
  416.         shift 1
  417.         continue        
  418.     Else If "{1}" =~ /-Proff/        ### Proff Tools 1.0b1
  419.         set    ProffOption    1
  420.         shift 1
  421.         continue        
  422.     Else If "{1}" =~ /-progress/
  423.         set    ProgressOption    "-p"
  424.         shift 1
  425.         continue
  426.     Else If "{1}" =~ /-≈/
  427.         Echo "### {0} - ∂"{1}∂" is not an option." > Dev:StdErr
  428.         Echo "# Usage - {0} -to dirname [ -from DirName | -custom filename ]" > Dev:StdErr
  429.         Echo "#         [ -install | -update | -revert ] [ -progress ]" > Dev:StdErr
  430.         Echo "#         [ -SADE ] [ -Macsbug ]" > Dev:StdErr
  431.         Exit 1
  432.     End
  433. End
  434.  
  435. If "{ToDir}" =~ /(≈:≈)®1:/                # strip the trialing colon (if any)
  436.     set ToDir "{®1}"
  437. End
  438.  
  439.  
  440. If "{ToSADE}" == "" && "{SADEOption}" != 0
  441.     If "{InstallFlag}" == 1            ### Update existing version to current
  442.         Set ToSADE `"{ShellDirectory}"GetFileName -d -m "Select SADE folder to update:" "{DestVolume}"; Set Canceled {Status}` ∑ Dev:Null
  443.     else If "{InstallFlag}" == 2    ### Revert existing version to a previous version
  444.         Set ToSADE `"{ShellDirectory}"GetFileName -d -m "Select SADE folder to revert:" "{DestVolume}"; Set Canceled {Status}` ∑ Dev:Null
  445.     End
  446. End
  447.  
  448. If "{ToSADE}" == "" && "{SADEOption}" != 0            ### let's assume they made a mistake
  449.     set ToSADE    "{DestVolume}SADE Folder"
  450. End
  451.  
  452. If "{ToSADE}" =~ /(≈:≈)®1:/                # strip the trialing colon (if any)
  453.     set ToSADE "{®1}"
  454. End
  455.  
  456. If Not "`Exists -d "{ToSADE}"`"
  457.     Newfolder "{ToSADE}"
  458. End
  459.  
  460.  
  461. If "{ToMacApp}" == "" && "{MacAppFlag}" != 0
  462.     If "{InstallFlag}" == 1            ### Update existing version to current
  463.         Set ToMacApp `"{ShellDirectory}"GetFileName -d -m "Select MacApp folder to update:" "{DestVolume}"; Set Canceled {Status}` ∑ Dev:Null
  464.     else If "{InstallFlag}" == 2    ### Revert existing version to a previous version
  465.         Set ToMacApp `"{ShellDirectory}"GetFileName -d -m "Select MacApp folder to revert:" "{DestVolume}"; Set Canceled {Status}` ∑ Dev:Null
  466.     End
  467. End
  468.  
  469.  
  470. If "{ToMacApp}" == ""     && "{MacAppFlag}" != 0        ### let's assume they made a mistake
  471.     set ToMacApp    "{DestVolume}MacApp Folder"
  472. End
  473.  
  474. If "{ToMacApp}" =~ /(≈:≈)®1:/                # strip the trialing colon (if any)
  475.     set ToMacApp "{®1}"
  476. End
  477.  
  478. If Not "`Exists -d "{ToMacApp}"`"
  479.     Newfolder "{ToMacApp}"
  480. End
  481.  
  482. If "{ToDir}" == "" && "{ToSADE}" == "" && "{ToMacApp}" == ""
  483.     Echo "### {0} - Must Select Destination Directory"
  484.     Exit 1
  485. Else If "{FromDirs}" == "" && "{SADEOption}" == "0" && 
  486.     "{MacsBugOption}" == "0" && "{411Option}" == "0" && "{ResEditOption}" == "0"
  487.     Echo "### {0} - Must Select Source Directory"
  488.     Exit 1
  489. End
  490.  
  491. If Not "`Exists -d "{CDVolume}"`"
  492.         Alert "Volume {CDVolume} is not online!"
  493.         Exit 1
  494. End
  495.  
  496. If {DebugFlag} == 1
  497.     echo    "FromDirs:      {FromDirs}"        > Dev:StdOut
  498.     echo    "ToDir:         {ToDir}"        > Dev:StdOut
  499.     echo    "ToSADE:        {ToSADE}"        > Dev:StdOut
  500.     echo    "ToMacApp:        {ToMacApp}"        > Dev:StdOut
  501.     echo    "SADE Option:    {SADEOption}"    > Dev:StdOut
  502.     echo    "CustomFiles:   {CustomFiles}"    > Dev:StdOut
  503.     echo    "UpdateFlag:    {UpdateFlag}"    > Dev:StdOut
  504.     echo    "InstallFlag:   {InstallFlag}"    > Dev:StdOut
  505.     echo    "RevertFlag:    {RevertFlag}"    > Dev:StdOut
  506.     echo    "RevertOption:  {RevertOption}"    > Dev:StdOut
  507.     echo    "ProgressOption:{ProgressOption}"    > Dev:StdOut
  508.     Exit 1
  509. End
  510.  
  511. echo "### Installation begun at "`date -t`" on "`date -d`" ###" > Installer.Log
  512.  
  513.     
  514.  
  515. # The backup tool will generate shell commands to copy the files off 
  516. # of the distribution compact disk into the final destination folder.
  517.  
  518. If "{FromDirs}" != ""
  519.  
  520.     For dir in {FromDirs}
  521.     
  522.         "{ShellDirectory}"Backup -from "{dir}" -to "{ToDir}" -r -a -c {RevertFlag} {ProgressOption} > copyStuff
  523.  
  524.         echo '### Copying from '"{dir}"' to '"{ToDir}"' at '`date -t`' on '`date -d`' ###' >> Installer.Log    
  525.  
  526.         # The DoIt script will execute the copy commands in the temporary 
  527.         # copyStuff file.  It will highlight each command as it is executed.
  528.         
  529.         "{ShellDirectory}"DoIt copyStuff ≥ errorFile
  530.         
  531.         catenate copystuff >> Installer.Log        ### save the commands!
  532.     End
  533. End
  534.  
  535. ###    Now handle the special cases like SADE, Macsbug, 411 and ResEdit
  536.  
  537.  
  538. ###        One More Time...
  539.  
  540. If Not "`Exists -d "{CDVolume}"`"
  541.     Alert "Volume {CDVolume} is not online!"
  542.     Exit 1
  543. End
  544.  
  545. ###    Special for MacApp - create folder, copy stuff and move the UserStartup file into the MPW folder.
  546.  
  547. If "{MacAppFlag}" != "0"
  548.  
  549.     If Not "`Exists -d "{ToMacApp}"`"
  550.         NewFolder "{ToMacApp}"
  551.     End
  552.         
  553.     echo '### Copying from '"{MacAppSource}{FromMacApp}"' to '"{ToMacApp}"' at '`date -t`' on '`date -d`' ###' >> Installer.Log
  554.  
  555.         
  556.     "{ShellDirectory}"Backup -from "{MacAppSource}{FromMacApp}" -to "{ToMacApp}" -r -a -c {RevertFlag} {ProgressOption} > copyStuff
  557.  
  558.     # The DoIt script will execute the copy commands in the temporary 
  559.     # copyStuff file.  It will highlight each command as it is executed.
  560.         
  561.     "{ShellDirectory}"DoIt copyStuff ≥ errorFile
  562.     
  563.     catenate copystuff >> Installer.Log        ### save the commands!
  564.  
  565.     If "`Exists -d "{ToDir}"`"
  566.         If "`Exists -f "{ToMacApp}:UserStartup•MacApp"`"
  567.             Duplicate -y "{ToMacApp}:UserStartup•MacApp" "{ToDir}:UserStartup•MacApp"
  568.         End
  569.     End
  570. End
  571.  
  572.  
  573. ### Install SADE 1.1 or 1.3b1
  574.  
  575. If "{SADEOption}" != "0"
  576.  
  577.     echo "### Installation of SADE at "`date -t`" on "`date -d`" ###" >> Installer.Log
  578.  
  579.     If "{ProgressOption}" =~ /-p/ 
  580.         Echo "Now Copying SADE..."
  581.     End
  582.     "SADE Install"
  583. End
  584.  
  585. ### Install Macsbug v. 6.2.1
  586.  
  587. If "{MacsbugOption}" != "0"
  588.  
  589.     echo "### Installation of MacsBug at "`date -t`" on "`date -d`" ###" >> Installer.Log
  590.  
  591.     If "{ProgressOption}" =~ /-p/ 
  592.         Echo "Now Copying MacsBug..."
  593.     End
  594.     "MacsBug Install" ≥ errorFile
  595. End
  596.  
  597. ###    Install ResEdit v. 1.2, 2.1 or 2.1.1b1
  598.  
  599. If "{ResEditOption}" != "0"
  600.  
  601.     echo "### Installation of Resedit at "`date -t`" on "`date -d`" ###" >> Installer.Log
  602.  
  603.     If "{ProgressOption}" =~ /-p/ 
  604.         Echo "Now Copying ResEdit..."
  605.     End
  606.     "ResEdit Install" ≥ errorFile
  607. End
  608.  
  609. ### Install Omega SANE v. 1.0b5
  610.  
  611. If "{SANEOption}" != "0"
  612.  
  613.     echo "### Installation of Omega SANE at "`date -t`" on "`date -d`" ###" >> Installer.Log
  614.  
  615.     If "{ProgressOption}" =~ /-p/ 
  616.         Echo "Now Copying Omega SANE..."
  617.     End
  618.     "SANE Install" ≥ errorFile
  619. End
  620.  
  621. ### Install 411
  622.  
  623. If    "{411Option}" != "0"
  624.  
  625.     echo "### Installation of “411” at "`date -t`" on "`date -d`" ###" >> Installer.Log
  626.  
  627.     If "{ProgressOption}" =~ /-p/ 
  628.         Echo "Now Copying 411..."
  629.     End
  630.     "411 Install" ≥ errorFile
  631. End
  632.  
  633. ### Install Big Brother
  634.  
  635. If    "{BBOption}" != "0"
  636.  
  637.     echo "### Installation of Big Brother at "`date -t`" on "`date -d`" ###" >> Installer.Log
  638.     
  639.     If "{ProgressOption}" =~ /-p/ 
  640.         Echo "Now Copying Big Brother..."
  641.     End
  642.     "Big Brother Install" ≥ errorFile
  643. End
  644.  
  645. ### Install SourceBug
  646.  
  647. If    "{SBOption}" != "0"
  648.  
  649.     echo "### Installation of SourceBug at "`date -t`" on "`date -d`" ###" >> Installer.Log
  650.  
  651.     If "{ProgressOption}" =~ /-p/ 
  652.         Echo "Now Copying SourceBug..."
  653.     End
  654.     "SourceBug Install" ≥ errorFile
  655. End
  656.  
  657. ### Install Discipline
  658.  
  659. If    "{DisciplineOption}" != "0"
  660.  
  661.     echo "### Installation of Discipline at "`date -t`" on "`date -d`" ###" >> Installer.Log
  662.  
  663.     If "{ProgressOption}" =~ /-p/
  664.         If    "{DisciplineOption}" == "1" || "{DisciplineOption}" == "3"
  665.             Echo "Now Copying Strict Discipline..."
  666.         Else If    "{DisciplineOption}" == "2" || If    "{DisciplineOption}" == "4"
  667.             Echo "Now Copying Lenient Discipline..."
  668.         End
  669.     End
  670.     "Discipline Install" ≥ errorFile
  671. End
  672.  
  673. ### Install Proff
  674.  
  675. If    "{ProffOption}" != "0"
  676.  
  677.     echo "### Installation of Proff tools at "`date -t`" on "`date -d`" ###" >> Installer.Log
  678.  
  679.     If "{ProgressOption}" =~ /-p/ 
  680.         Echo "Now Copying Proff Tools..."
  681.     End
  682.     "Proff Install" ≥ errorFile
  683. End
  684.  
  685.  
  686. echo "### Installation completed at "`date -t`" on "`date -d`" ###" >> Installer.Log
  687.  
  688. # If we got some error while copying the file from the distribution 
  689. # compact disk to the destination disk, display the error message and quit.
  690.  
  691. If "`Exists -f "errorFile"`"
  692.     Open -t errorFile
  693.     Find • errorFile
  694.     Find /'#'/ errorFile     ### There is an error
  695.     Set FindStatus {Status}
  696.     Close errorFile
  697. Else
  698.     Set FindStatus 1
  699. End
  700.  
  701. If "{FindStatus}" == "0"
  702.     Alert "`catenate errorFile`"
  703.     Close -n copyStuff ≥ dev:null
  704.     Delete "errorfile" ≥ dev:null
  705.     Quit
  706. Else
  707.     Delete copyStuff ≥ dev:null
  708. End
  709.  
  710. Exit 0
  711.